package baseAop4_tx_bank_web.Controller;

import lombok.extern.log4j.Log4j2;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Log4j2
public class HelloController {

    private Environment env;
    @RequestMapping("/")
    String home(){
        log.info("luelue");
        log.debug("debug");
        log.info("info");
        log.warn("warning");
        log.error("error");

        log.info( env.getProperty("pname")+" "+ env.getProperty("myfilepath"));
        log.info( env.getProperty("server.port"));
        return "hello world";
    }
}
